﻿#include"HuffmanTree.h"

class FileCompressHM
{
public:
	FileCompressHM();  //对_info数组进行初始化
    int CompressFile(const std::string& filepath);
	int UncompressFile(const std::string& filepath);

private:
	std::vector<ByteInfo> _info;

	void GetHuffmanCode(HtNode<ByteInfo>* root);
	void WriteHeadInfo(const std::string& filepath, FILE* fout);
	std::string GetFilePostfix(const std::string& filepath);
	void GetLine(FILE* fin,std::string& postfix);
};












